﻿using eslib.tools.config;

namespace ArticleClientLib
{
    public class ObjectJsonResult
    {
        /// <summary>
        /// 执行成功返回true
        /// </summary>
        public bool success { get; set; }

        /// <summary>
        /// 错误代码，成功返回0,异常返回错误代码(对应enum)
        /// </summary>
        public int errcode { get; set; }

        /// <summary>
        /// 附加消息
        /// </summary>
        public string msg { get; set; }

        /// <summary>
        /// 绑定对象
        /// </summary>
        public object data { get; set; }

        public ObjectJsonResult() { }

        public static ObjectJsonResult FromString(string json)
        {
            return GenericJsonConfig.LoadFromString<ObjectJsonResult>(json);
        }
    }


}